package flc.ast.fragment;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.blankj.utilcode.util.ToastUtils;

import flc.ast.R;
import flc.ast.activity.FindResultActivity;
import flc.ast.activity.HistoryActivity;
import flc.ast.databinding.FragmentPeccancyBinding;
import stark.common.apis.ApiManager;
import stark.common.apis.base.JtwzdmQueryBean;
import stark.common.base.IReqRetCallback;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.event.EventStatProxy;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link PeccancyFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class PeccancyFragment extends BaseNoModelFragment<FragmentPeccancyBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_peccancy;
    }

    @Override
    protected void initView() {
        EventStatProxy.getInstance().statEvent5(getActivity(), mDataBinding.event5Container);
        mDataBinding.ivFind.setOnClickListener(this);
        mDataBinding.ivFindRecord.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()){
            case R.id.ivFind:
                String code=mDataBinding.etPunishmentId.getText().toString();
                if (code.isEmpty()){
                    ToastUtils.showShort(getString(R.string.please_input_peccancy_code));
                    return;
                }
                FindResultActivity.code=code;
                startActivity(FindResultActivity.class);
                break;
            case R.id.ivFindRecord:
                startActivity(HistoryActivity.class);
                break;
        }
    }

    @Override
    protected void initData() {

    }
}